package ch.sfug.events {
	import flash.display.InteractiveObject;
	import flash.events.Event;	

	public class ButtonGroupEvent extends Event {
		
		public static const DEACTIVATE:String = "buttongroup_deactivate";
		public static const ACTIVATE:String = "buttongroup_activate";

		private var _selected:InteractiveObject;


		public function ButtonGroupEvent(type:String, selected:InteractiveObject, bubbles:Boolean = false, cancelable:Boolean = false) {
			super(type, bubbles, cancelable);
			
			_selected = selected;
		}

		
		
		public override function clone():Event {
			return new ButtonGroupEvent(type, _selected);
		}

		public function get active():InteractiveObject {
			return _selected;
		}

		
		public override function toString():String { 
			return formatToString("type", "selected", "bubbles", "cancelable", "eventPhase"); 
		}
	}
}